#include <iostream>
#include <vector>
#include <string>
#include "Game.h"
#include "GameObject.h"
#include "ImgMap.h"
#include "action.h"
#include "utils.hpp"

int main()
{
    MainGraphic MG;

    GameObject::mg = &MG;

    std::vector<std::string> back;
    back.push_back("map1/map_background_03");
    back.push_back("map1/map_background_02");
    back.push_back("map1/map_background_01");
    ImgMap map(MG);
    map.loadMap("map1/map_foreground", back);
    Game game(MG, map);
    game.init();

    MG.setTarget(&(game.getPlayer()->getPosition()));

    while (MG.IsOpened())
    {
        game.update(MG.GetElapsedTime(), MG.GetInput());
        MG.Display();
    }


    return EXIT_SUCCESS;
}
